Optimal. Leaf size=74 \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac {b e n \log (d+e x)}{f (d f-e g)}+\frac {b e n \log (f x+g)}{f (d f-e g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2412, 2395, 36, 31} \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac {b e n \log (d+e x)}{f (d f-e g)}+\frac {b e n \log (f x+g)}{f (d f-e g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 36
Rule 2395
Rule 2412
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx &=\int \frac {a+b \log \left (c (d+e x)^n\right )}{(g+f x)^2} \, dx\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{(d+e x) (g+f x)} \, dx}{f}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{g+f x} \, dx}{d f-e g}-\frac {\left (b e^2 n\right ) \int \frac {1}{d+e x} \, dx}{f (d f-e g)}\\ &=-\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 57, normalized size = 0.77 \[ \frac {\frac {b e n (\log (d+e x)-\log (f x+g))}{e g-d f}-\frac {a+b \log \left (c (d+e x)^n\right )}{f x+g}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 95, normalized size = 1.28 \[ -\frac {a d f - a e g + {\left (b e f n x + b d f n\right )} \log \left (e x + d\right ) - {\left (b e f n x + b e g n\right )} \log \left (f x + g\right ) + {\left (b d f - b e g\right )} \log \relax (c)}{d f^{2} g - e f g^{2} + {\left (d f^{3} - e f^{2} g\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 111, normalized size = 1.50 \[ \frac {b f n x e \log \left (f x + g\right ) - b f n x e \log \left (x e + d\right ) + b g n e \log \left (f x + g\right ) - b d f n \log \left (x e + d\right ) - b d f \log \relax (c) + b g e \log \relax (c) - a d f + a g e}{d f^{3} x - f^{2} g x e + d f^{2} g - f g^{2} e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.36, size = 354, normalized size = 4.78 \[ -\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{\left (f x +g \right ) f}-\frac {-i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b d f \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b d f \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+2 b e f n x \ln \left (e x +d \right )-2 b e f n x \ln \left (-f x -g \right )+i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b e g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+2 b e g n \ln \left (e x +d \right )-2 b e g n \ln \left (-f x -g \right )+2 b d f \ln \relax (c )-2 b e g \ln \relax (c )+2 a d f -2 a e g}{2 \left (f x +g \right ) \left (d f -e g \right ) f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 86, normalized size = 1.16 \[ -b e n {\left (\frac {\log \left (e x + d\right )}{d f^{2} - e f g} - \frac {\log \left (f x + g\right )}{d f^{2} - e f g}\right )} - \frac {b \log \left ({\left (e x + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac {a}{f^{2} x + f g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.90, size = 84, normalized size = 1.14 \[ -\frac {a}{x\,f^2+g\,f}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{f\,\left (g+f\,x\right )}+\frac {b\,e\,n\,\mathrm {atan}\left (\frac {e\,g\,2{}\mathrm {i}+e\,f\,x\,2{}\mathrm {i}}{d\,f-e\,g}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{f\,\left (d\,f-e\,g\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________